<template>
	<view>
		<view v-if="token && numList.gz === 0" class="wid100 poFix" style="top: 0;background: #444444;z-index: 9999;">
			<view class="wid90 mar dis disAl disJuB coFFF" style="height: 100rpx;">
				<view class="dis disAl">
					<image :src="numList.gzh_logo" class="borRad50" style="width: 80rpx;height: 80rpx;">
					</image>
					<view class="foSi28 mar-left20">
						<view>关注“心成就业发布”公众号</view>
						<view class="foSi25">接收海量就业信息</view>
					</view>
				</view>
				<view class="dis disAl disJuC guanzhu" @click.stop="open">点击关注</view>
			</view>
		</view>
		<view v-if="token && numList.gz === 0" style="height: 100rpx;"></view>
		<uni-popup ref="popup">
			<view class="bacFFF borRad20" style="padding: 20rpx 0;width: 400rpx;">
				<view class="mar" style="width: 300rpx;height: 300rpx;">
					<image :src="numList.gzh_ewm" class="wh100"></image>
				</view>
				<view class="textCen foSi25 mar-top10">长按保存</view>
			</view>
		</uni-popup>
		<view class="container_2">
			<view class="wid100" style="height: 260rpx;background: #3978F9;">
				<view class="wid90 mar dis disAl disJuB" style="height: 100rpx;">
					<navigator url="../city/index?id=0" hover-class="none">
						<view class="dis disAl coFFF">
							<image src="../../static/imgs/icon/dengwei.png" style="width: 28rpx;height: 30rpx;"></image>
							<span class="overflowHidden foSi25 mar-left20 mar-right20"
								style="max-width: 220rpx;">{{ city || '请选择' }}</span>
							<image src="../../static/imgs/icon/jiantou.png" style="width: 18rpx;height: 10rpx;"></image>
						</view>
					</navigator>
					<view class="hei60 dis disAl borRad40 bacFFF foSi25" @tap="toSelectJob"
						style="width: 340rpx;color: #D3D1D1;">
						<view class="wid20 dis disJuC">
							<icon type="search" size="14" />
						</view>
						<view>请搜索职位/公司</view>
					</view>
				</view>
			</view>
			<view class="wid100 bacFFF bor2" style="margin-top: -160rpx;">
				<view style="height: 50rpx;"></view>
				<view class="wid90 mar dis flwa foSi25">
					<view class="item wid20 mar-bott20" v-for="(item, index) in navlist" :key="index">
						<form @submit="parseEventDynamicCode($event, item.link)" report-submit>
							<button class="shares"
								:style="'background-image:url(' + item.thumb + '); background-repeat:no-repeat;background-size:100% 100%;'"
								formType="submit"></button>
							<input class="disNonew" type="text" name="appid" :value="item.appid" />
							<input class="disNonew" type="text" name="innerurl" :value="item.innerurl" />
							<input class="disNonew" type="text" name="id" :value="item.id" />
						</form>

						<view class="textCen mar-top10">{{ item.advname }}</view>
					</view>
				</view>
				<!-- <view class="wid90 mar dis flwa foSi25 mar-bott20">
					<view class="wid20" v-for="(item, index) in navlist" :key="index"
						@click.stop="tiaozhuan(item.innerurl)">
						<view class="mar" style="width: 88rpx;height: 88rpx;">
							<image :src="item.thumb" class="wh100"></image>
						</view>
						<view class="textCen mar-top20">{{ item.advname }}</view>
					</view>
				</view> -->
				<view class="hei20"></view>
				<view class="wid90 mar borRad20" style="background: #E1ECFB;color: #337EE6;">
					<view class="wid90 mar dis disAl" @click.stop="tiaozhuan('/pages/noticedetail/noticedetail')">
						<view class="dis disAl" style="width: 15%;">
							<image src="../../static/imgs/icon/gonggao.png" style="width: 50rpx;height: 38rpx;"></image>
						</view>
						<swiper class="wid80" style="height: 60rpx;" :vertical="true" :autoplay="true" :circular="true"
							interval="2000">
							<swiper-item class="dis disAl" style="height: 60rpx;" v-for="(item, index) in noticelist"
								:key="index">
								<view class="wid100 overflowHidden">{{ item.title }}</view>
							</swiper-item>
							<!-- <swiper-item v-if="noticelist.length < 3" class="dis disAl" 
								style="height: 60rpx;" v-for="(item, index) in 5-noticelist.length%5" :key="index+'a'"></swiper-item>
							<swiper-item v-if="noticelist.length < 10" class="dis disAl" style="height: 60rpx;" v-for="(item, index) in noticelist" :key="index+'a'">
								<view class="wid100 overflowHidden">{{ item.title }}</view>
							</swiper-item>
							<swiper-item v-if="noticelist.length < 3" class="dis disAl"
								style="height: 60rpx;" v-for="(item, index) in 5-noticelist.length%5" :key="index+'b'"></swiper-item> -->
						</swiper>
					</view>
				</view>
				<view class="wid100 mar-top30" style="border: 2rpx solid #E5E5E5;border-left: none;border-right: none;">
					<view class="wid90 mar dis disAl disJuB hei80 foSi25">
						<view v-if="numList.follow_status === 1">
							<span>关注：</span>
							<span style="color: #337EE6;">{{ numList.follow_num || 0 }}</span>
						</view>
						<view v-if="numList.member_status === 1">
							<span>会员：</span>
							<span style="color: #337EE6;">{{ numList.member_num || 0 }}</span>
						</view>
						<view v-if="numList.month_status === 1">
							<span>当月在线：</span>
							<span style="color: #337EE6;">{{ numList.month_num || 0 }}</span>
						</view>
						<view v-if="numList.accum_status === 1">
							<span>累计在线：</span>
							<span style="color: #337EE6;">{{ numList.accum_num || 0 }}</span>
						</view>
					</view>
				</view>
				<view class="wid90 mar mar-top20 dis disAl disJuB">
					<view style="width: 330rpx;height: 138rpx;" @tap="toPerLogin">
						<image src="../../static/imgs/icon/dneglu.jpg" class="wh100"></image>
					</view>
					<view style="width: 330rpx;height: 138rpx;" @tap="toTaskjob">
						<image src="../../static/imgs/icon/jianli.png" class="wh100"></image>
					</view>
					<!-- <view class="wid100" style="height: 228rpx;" @tap="toTaskjob" v-if="token">
						<image src="../../static/imgs/icon/jianli.png" class="wh100"></image>
					</view> -->
				</view>
				<view class="wid90 mar type-container_2 mar-top20">
					<scroll-view class="type-navbar_2 wid100" style="padding-left: 10rpx;" :scroll-x="true">
						<view class="type-box_2" v-for="(item, index) in companylist" :key="index">
							<view :data-id="item.id" class="type-navbar-item_2" @tap="toCompanydetial">
								<image :src="item.thumb" style="width: 120rpx; height: 120rpx; border-radius: 70rpx">
								</image>
							</view>
							<view class="companyname">{{ item.companyname }}</view>
							<view>
								<text>{{ item.jobcount }}</text>
								个职位热招
							</view>
						</view>
					</scroll-view>
				</view>
				<!-- <view v-if="!token" class="login"> -->
				<!-- <button @tap="toPerLogin">用户登录</button> -->
				<!-- <button @tap="toPerRegister">立即注册</button> -->
				<!-- </view> -->
				<view class="wid100 mar-top20" style="border-bottom: 2rpx solid #E5E5E5;">
					<view class="wid90 mar dis disJuB hei60">
						<view class="wid87 type-container_2">
							<scroll-view class="type-navbar_2 foSi25" style="color: #747474;" :scroll-x="true">
								<view class="dis">
									<view class="poRel dis disAl hei60 mar-right40"
										:class="worktype == -1 ? 'foSi30 co337 fowebl' : ''" :data-id="-1"
										@tap="selectjobtype">
										<span>全部</span>
										<view class="poAbs wid100" :class="worktype == -1 ? 'cateselected' : ''">
										</view>
									</view>
									<view class="poRel dis disAl hei60 mar-right40"
										:class="worktype == item.id ? 'foSi30 co337 fowebl' : ''" :data-id="item.id"
										@tap="selectjobtype" v-for="(item, index) in worktyelist" :key="index">
										<span>{{ item.name }}</span>
										<view class="poAbs wid100" :class="worktype == item.id ? 'cateselected' : ''">
										</view>
									</view>
								</view>
							</scroll-view>
						</view>
						<view class="dis disAl" @tap="toSelectJob">
							<image src="../../static/imgs/icon/shaixuan.png" style="width: 30rpx;height: 30rpx;">
							</image>
							<view class="foSi20" style="color: #747474;">筛选</view>
						</view>
					</view>
				</view>
				<block name="ejoblist" v-if="joblist">
					<view class="wid90 mar bacFFF borRad20 mar-top30" v-for="(item, index) in joblist" :key="index"
						@tap="toJobDetail(item.id)"
						style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.1);padding: 30rpx 0;">
						<view class="wid90 mar">
							<view class="dis disJuB">
								<view class="fowebl foSi30">{{ item.jobtitle }}</view>
								<view class="foSi20" style="color: #747474;">{{ item.updatetime }}</view>
							</view>
							<view class="mar-top20 dis disAl disJuB">
								<view class="hei40 dis disAl co337 foSi20"
									style="background: #E1ECFB;padding: 0 10rpx;">09:00-17:00</view>
								<view class="foSi35" style="color: #FF0000;">
									<block v-if="item.money == 0">面议</block>
									<block v-else>{{ item.money }}</block>
								</view>
							</view>
							<view class="dis disAl mar-top20">
								<image src="../../static/imgs/icon/dingwei1.png" style="width: 28rpx;height: 30rpx;">
								</image>
								<view class="mar-left10">{{ item.areaname }} | {{ item.education }}</view>
							</view>
							<view class="dis disAl mar-top20">
								<image src="../../static/imgs/icon/backtop.png" style="width: 40rpx;height: 40rpx;">
								</image>
								<view class="mar-left10 fowebl foSi22">{{ item.companyname }}</view>
							</view>
						</view>
					</view>
				</block>

				<view class="morejob" @tap="toFindjob">查看全部职位信息></view>

				<view class="footerinfo">
					<view @tap="toArticleDetail" data-id="53">隐私政策</view>
					|
					<view @tap="toArticleDetail" data-id="54">入驻指南</view>
					|
					<view @tap="toArticleDetail" data-id="55">用户须知</view>
				</view>
			</view>
		</view>
		<view class="cu-bar tabbar foot bg-white">
			<view class="action text-blue" @tap="toIndex">
				<view class="cuIcon-homefill"></view>
				首页
			</view>
			<view class="action text-gray" @tap="toFindjob">
				<view class="cuIcon-similar"></view>
				职位
			</view>
			<!-- <view class="action text-gray add-action" @tap="toMyinvate">
				<button class="cu-btn cuIcon-add bg-blue"></button>
				发布
			</view> -->

			<view class="action text-gray" @tap="toSysmsg">
				<view class="cuIcon-notice"></view>
				消息
			</view>
			<view class="action text-gray" @tap="toMyuser">
				<view class="cuIcon-my"></view>
				我的
			</view>
		</view>
	</view>
</template>

<script>
	import {
		Home2
	} from './index-model.js';
	var home = new Home2(); //实例化 首页 对象
	var QQMapWX = require('../../utils/qqmap-wx-jssdk.min.js');
	var qqmapsdk;
	import {
		User
	} from '../../model/user-model.js';
	var user = new User();
	import {
		Job
	} from '../../model/job-model.js';
	var job = new Job();
	import {
		Token
	} from '../../utils/token.js';
	var token = new Token();
	import {
		Company
	} from '../../model/company-model.js';
	var company = new Company();
	export default {
		data() {
			return {
				autoplay: true,
				interval: 3000,
				duration: 1000,
				autoplay: true,
				interval2: 3500,
				duration2: 2000,
				//是否采用衔接滑动
				circular: true,
				//是否显示画板指示点
				indicatorDots: false,
				//选中点的颜色
				indicatorcolor: '#000',
				//是否竖直
				vertical: false,
				//是否自动切换
				//滑动动画时长毫秒
				//所有图片的高度
				imgheights: [],
				//图片宽度
				imgwidth: 750,
				//默认
				current: 0,
				swiperCurrent: 0,
				loadingHidden: false,
				title: '',
				worktype: -1,
				joblist: '',
				city: '',
				bannerlist: '',
				navlist: '',
				companylist: '',
				worktyelist: '',
				sysinfo: {
					companycount: '',
					jobcount: '',
					notecount: ''
				},
				noticelist: '',
				noticeLength: 0,
				token: '',
				numList: {
					gz: 1,
					gzh_ewm: "https://zhaopin.10pay.cn/uploads/20250113/62002629a4a071d92a91e12d41793449.png",
					gzh_logo: "https://zhaopin.10pay.cn/uploads/20250110/d5ae0ea577bd8ea65d1ed025d4bcf44c.png",
					gzh_title: "心成就业网",
					accum_num: 0,
					accum_status: 1,
					follow_num: 0,
					follow_status: 1,
					member_num: 0,
					member_status: 1,
					month_num: 0,
					month_status: 1
				}
			};
		},
		onShow: function() {
			this.token = uni.getStorageSync('token')
			this.onShowClone3389();
			this.getIndexNum()
		},
		onLoad: function(options) {
			console.log('接收数据', options)
			// uni.setStorageSync('token', '17585804215f574e82282822de0fd0f9')
			var that = this;
			// wx.setStorageSync('rectid',10);
			if (options) {
				if (options.hasOwnProperty('scene')) {
					var scene = decodeURIComponent(options.scene);
					var uid_array = scene.split('=');
					if (uid_array[0] == 'rectid') {
						var rectid = parseInt(uid_array[1]);
						uni.setStorageSync('rectid', rectid);
					} else {
						var uid = parseInt(uid_array[1]);
						uni.setStorageSync('tid', uid);
					}
				}
				if (options.hasOwnProperty('pid')) {
					uni.setStorageSync('pid', options.pid)
				}
			}
			that.token = uni.gtStorageSync('token');
			uni.showShareMenu({
				withShareTicket: true,
				menus: ['shareAppMessage', 'shareTimeline']
			});
			//  var cityinfo =[];
			//cityinfo.name = '盐城';
			//wx.setStorageSync('cityinfo',cityinfo);
		},
		/*下拉刷新页面*/
		onPullDownRefresh: function() {
			uni.showNavigationBarLoading();
			this.onShowClone3389({});
		},
		//分享效果
		onShareAppMessage: function() {
			var that = this;
			return {
				title: that.title,
				path: '/pages/index/index'
			};
		},
		methods: {
			open() {
				// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ，type 属性将失效 ，仅支持 ['top','left','bottom','right','center']
				this.$refs.popup.open('center')
			},
			getIndexNum() {
				var that = this;
				var params = {};
				user.indexNum((data) => {
					if (data.code === 0) {
						that.numList = data.data
					} else {
						uni.showToast({
							title: data.msg,
							icon: 'none',
							duration: 2000
						})
					}
				}, params);
			},
			onShowClone3389: function() {
				var that = this;

				var cityinfo = uni.getStorageSync('cityinfo');
				console.log('缓存城市信息为', cityinfo)
				if (cityinfo) {
					console.log('有缓存')
					uni.setStorageSync('city', cityinfo.name);
					that.loadDataFun();
				} else {
					console.log('没缓存')
					//获取信息
					qqmapsdk = new QQMapWX({
						// 必填
						key: '5D3BZ-J55WF-SFPJJ-NI6PG-YN2ZO-M4BHX'
					});
					uni.setStorageSync('city', '全国');
					console.log('设置城市为全国')
					that.loadDataFun();
					// uni.getLocation({
					// 	type: 'gcj02',
					// 	// 默认为 wgs84 返回 gps 坐标，gcj02 返回可用于 wx.openLocation 的坐标
					// 	success: function(res) {
					// 		uni.setStorageSync('latitude', res.latitude);
					// 		uni.setStorageSync('longitude', res.longitude);
					// 		qqmapsdk.reverseGeocoder({
					// 			location: {
					// 				latitude: res.latitude,
					// 				longitude: res.longitude
					// 			},
					// 			success: function(addressRes) {
					// 				var address = addressRes.result.address_component.city;
					// 				var city = address.substr(0, address.length - 1);
					// 				console.log(city);
					// 				uni.setStorageSync('city', '全国');
					// 				console.log('设置城市为全国')
					// 				that.loadDataFun();
					// 			}
					// 		});
					// 	},

					// 	fail: function() {
					// 		// fail
					// 		console.log('错了啊')
					// 		uni.setStorageSync('city', '全国');
					// 		console.log('设置城市为全国')
					// 		that.loadDataFun();
					// 	},

					// 	complete: function() {}
					// });
				}
			},

			imageLoad: function(e) {
				var imgwidth = e.detail.width;
				var imgheight = e.detail.height;
				var //宽高比
					ratio = imgwidth / imgheight;
				var viewHeight = 750 / ratio;
				var imgheight = viewHeight;
				var imgheights = this.imgheights;
				//把每一张图片的高度记录到数组里
				imgheights.push(imgheight);
				this.setData({
					imgheights: imgheights
				});
			},

			bindchange: function(e) {
				console.log(e.detail.current);
				this.setData({
					current: e.detail.current
				});
			},

			swiperChange: function(e) {
				this.setData({
					swiperCurrent: e.detail.current //获取当前轮播图片的下标
				});
			},
			tiaozhuan(url) {
				uni.navigateTo({
					url: url
				});
			},
			toIndex: function() {
				uni.redirectTo({
					url: '/pages/index/index'
				});
			},

			toFindjob: function(e) {
				var that = this;
				uni.redirectTo({
					url: '/pages/findjob/index'
				});
			},

			toMyinvate: function(e) {
				var that = this;
				/*
        wx.redirectTo({
          url: "/pages/myinvate/index"
        })
      */

				uni.redirectTo({
					url: '/pages/switchrole/index'
				});
			},

			toSysmsg: function() {
				uni.redirectTo({
					url: '/pages/sysmsg/index'
				});
			},

			toMyuser: function() {
				uni.redirectTo({
					url: '/pages/user/index'
				});
			},

			selectjobtype: function(e) {
				var that = this;
				var worktype = e.currentTarget.dataset.id;
				that.worktype = worktype;
				that.setData({
					worktype: that.worktype
				});
				that.getjoblist();
			},

			selectjobtype2: function(e) {
				var that = this;
				var worktype = e.currentTarget.dataset.id;
				that.worktype = worktype;
				that.setData({
					worktype: that.worktype
				});
				that.getjoblist();
			},

			getjoblist: function() {
				var that = this;
				var cityid = uni.getStorageSync('cityinfo').id;
				var params = {
					cityid: cityid,
					worktype: that.worktype
				};
				job.getJobIndexList((data) => {
					that.setData({
						joblist: data.joblist
					});
				}, params);
			},

			toIndex: function() {
				uni.redirectTo({
					url: '/pages/index/index'
				});
			},

			rectbinduser: function() {
				if (uni.getStorageSync('rectid') > 0) {
					var params = {
						rectid: uni.getStorageSync('rectid')
					};
					home.rectBinduser((data) => {}, params);
				}
			},

			fxbinduser: function() {
				if (uni.getStorageSync('tid') > 0) {
					var params = {
						tid: uni.getStorageSync('tid')
					};
					home.fxBinduser((data) => {}, params);
				}
			},

			/*加载所有数据*/
			loadDataFun: function(callback) {
				var that = this;
				var city;
				city = uni.getStorageSync('city');
				console.log('取城市值为', city)
				home.getSysinit(city, (data) => {
					uni.setNavigationBarTitle({
						title: data.sysinfo.name
					});
					that.title = data.sysinfo.name;
					console.log(data.bannerlist);
					uni.setStorageSync('cityinfo', data.cityinfo);
					uni.hideNavigationBarLoading(); //完成停止加载
					uni.stopPullDownRefresh();
					console.log(1231, data);
					var worktypelist = data.worktyelist;
					// that.worktype = worktypelist[0]['id'];
					that.setData({
						// worktype: that.worktype,
						city: uni.getStorageSync('cityinfo').name,
						bannerlist: data.bannerlist,
						navlist: data.navlist,
						companylist: data.companylist,
						worktyelist: data.worktyelist,
						sysinfo: data.sysinfo,
						// joblist:data.joblist,
						noticelist: data.noticelist,
						noticeLength: Math.ceil(data.noticelist.length / 5)
					});
					that.getjoblist();
					if (uni.getStorageSync('tid') > 0) {
						setTimeout(() => {
							that.fxbinduser();
						}, 2000);
					}
					if (uni.getStorageSync('rectid') > 0) {
						that.rectbinduser();
					}
					uni.hideNavigationBarLoading(); //完成停止加载
					uni.stopPullDownRefresh();
				});
			},

			toNagivate: function(e) {
				var url = e.currentTarget.dataset.id;
				console.log(url);
				uni.navigateTo({
					url: url
				});
			},

			toSwitchtab: function(e) {
				var url = e.currentTarget.dataset.id;
				uni.switchTab({
					url: url
				});
			},

			toWxapp: function(e) {
				var url = e.detail.value.innerurl;
				var appid = e.detail.value.appid;
				console.log(url);
				console.log(appid);
				uni.navigateToMiniProgram({
					appId: appid,
					path: url,
					extraData: {
						foo: 'bar'
					},
					envVersion: 'develop',
					success(res) {
						// 打开成功
					}
				});
			},

			toInnerUrl: function(e) {
				var url = e.detail.value.innerurl;
				if (!this.token) {
					uni.navigateTo({
						url: '/pages/login/index'
					});
				} else {
					uni.navigateTo({
						url: url
					});
				}
			},

			toWebview: function(e) {
				var id = e.detail.value.id;
				var url = '/pages/webview/index?id=' + id;
				uni.navigateTo({
					url: url
				});
			},

			toMenuUrl: function(e) {
				var url = e.detail.value.innerurl;
				uni.switchTab({
					url: url
				});
			},

			toCompanylist: function() {
				var that = this;
				uni.navigateTo({
					url: '/pages/companylist/index'
				});
			},

			toSelectJob: function() {
				var that = this;
				uni.navigateTo({
					url: '/pages/selectjob/index'
				});
			},

			toPerLogin: function() {
				var that = this;
				uni.navigateTo({
					url: '/pages/login/index'
				});
			},

			toPerRegister: function() {
				var that = this;
				uni.navigateTo({
					url: '/pages/login/index'
				});
			},

			toTaskjob: function() {
				var that = this;
				if (!uni.getStorageSync('token')) {
					return uni.navigateTo({
						url: '/pages/login/index'
					});
				}
				var params = {};
				token.verify(
					user.checkBind((data) => {
						if (data.isbind) {
							uni.navigateTo({
								url: '/pages/mynote/index'
							});
						} else {
							uni.navigateTo({
								url: '/pages/login/index'
							});
						}
					}, params)
				);

				/*
           wx.navigateTo({
          url: "/pages/taskjob/index"
        })
          */
			},

			toJobDetail: function(id) {

				uni.navigateTo({
					url: '/pages/jobdetail/index?id=' + id
				});
			},

			toFindworker: function(e) {
				var that = this;
				uni.switchTab({
					url: '/pages/findworker/index'
				});
			},

			toCompanydetial: function(e) {
				var id = e.currentTarget.dataset.id;
				uni.navigateTo({
					url: '/pages/companydetail/index?id=' + id
				});
			},

			toLogin: function(e) {
				var that = this;
				var params = {};
				token.verify(
					user.checkBind((data) => {
						if (data.isbind) {
							var ctoken = uni.getStorageSync('ctoken');
							if (ctoken) {
								var params = {
									ctoken: ctoken
								};
								company.checkLogin((data) => {
									if (data.error == 0) {
										uni.navigateTo({
											url: '/pages/companycenter/index'
										});
									} else {
										uni.navigateTo({
											url: '/pages/companylogin/index'
										});
									}
								}, params);
							} else {
								uni.navigateTo({
									url: '/pages/companylogin/index'
								});
							}
						} else {
							uni.navigateTo({
								url: '/pages/login/index'
							});
						}
					}, params)
				);
			},

			toArticle: function(e) {
				var that = this;
				uni.navigateTo({
					url: '/pages/article/index'
				});

				/*
       
      */
			},

			toLiveOn: function(e) {
				var id = e.detail.value.innerurl;
				let roomId = [id];
				let customParams = encodeURIComponent(
					JSON.stringify({
						path: 'pages/index/index',
						pid: 1
					})
				);
				uni.navigateTo({
					url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${customParams}`
				});
			},

			toActive: function(e) {
				var that = this;
				uni.navigateTo({
					url: '/pages/active/index'
				});
			},

			toArticleDetail: function(e) {
				var id = e.currentTarget.dataset.id;
				uni.navigateTo({
					url: '/pages/articledetail/index?id=' + id
				});
			}
		}
	};
</script>
<style>
	page {
		background: #fff;
	}

	.container_2 {
		background-color: #fff;
		min-height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-bottom: 250rpx;
	}

	.header_2 {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
		background: #fff;
	}

	.header_2 .city_2 {
		height: 80rpx;
		line-height: 80rpx;
		color: #000000;
		font-size: 0.9rem;
		font-weight: 600;
	}

	.header_2 .search_2 {
		width: 500rpx;
		height: 80rpx;
		line-height: 80rpx;
		background: #f0f1f5;
		display: flex;
		flex-direction: row;
		justify-content: center;
		border-radius: 30rpx 30rpx 30rpx 0rpx;
	}

	.header_2 .search_2 view {
		color: #a6a6a6;
		font-size: 0.7rem;
		align-self: center;
	}

	.header_2 .search_2 icon {
		margin-right: 20rpx;
		margin-top: 18rpx;
	}

	.swiper-container_2 {
		width: 720rpx;
		position: relative;
		margin-top: 20rpx;
	}

	.swiper_box_2 {
		width: 100%;
	}

	swiper-item_2 image {
		width: 100%;
		display: inline-block;
		overflow: hidden;
		border-radius: 20rpx;
	}

	.swiper-container_2 .dots_2 {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 20rpx;
		display: flex;
		justify-content: center;
	}

	.swiper-container_2 .dots_2 .dot_2 {
		margin: 0 8rpx;
		width: 14rpx;
		height: 14rpx;
		background: #fff;
		border-radius: 50%;
		transition: all 0.6s;
		opacity: 0.5;
	}

	.swiper-container_2 .dots_2 .dot_2 .active_2 {
		width: 14rpx;
		opacity: 1;
	}

	.jobspace_2 {
		width: 720rpx;
		display: flex;
		flex-direction: row;

		justify-content: space-between;
		margin-top: 20rpx;
	}

	.jobspace_2>view {
		width: 350rpx;
		height: 150rpx;
		background: #fff;
		border-radius: 20rpx 50rpx 20rpx 50rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		box-shadow: 0 1px 6px 0 rgba(59, 83, 115, 0.06), 0 7px 14px 0 rgba(59, 83, 115, 0.1);
	}

	.spaceitem_2 image {
		width: 90rpx;
		height: 90rpx;
	}

	.spacetext_2 {
		display: flex;
		flex-direction: column;

		padding: 20rpx;
	}

	.spacetext_2 view:nth-child(1) {
		font-size: 0.9rem;
		color: #000000;
		font-weight: 600;
	}

	.spacetext_2 view:nth-child(2) {
		font-size: 0.6rem;
		color: #888888;
	}

	.tongji {
		width: 100%;
		display: flex;
		justify-content: flex-start;
		flex-direction: row;
		padding-top: 20rpx;
		margin-top: 20rpx;
		margin-bottom: 10rpx;
		flex-wrap: wrap;
		font-size: 14px;
		color: #888888;
		font-weight: 500;
	}

	.tongji view:nth-child(1) {
		margin-left: 55rpx;
	}

	.tongji>view {
		margin-left: 30rpx;
	}

	.tongji text {
		color: red;
	}

	.tongji image {
		width: 35rpx;
		height: 35rpx;
	}

	.navlist {
		width: 720rpx;
		display: flex;
		justify-content: space-around;
		flex-direction: row;
		padding-top: 20rpx;
		flex-wrap: wrap;
		padding-bottom: 5rpx;
		border-radius: 15rpx;
	}

	.navlist .item {
		width: 170rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		font-size: 0.8rem;
		padding-bottom: 10rpx;
		color: #888888;
	}

	.navlist .item image {
		width: 110rpx;
		height: 110rpx;
	}

	.shares {
		width: 110rpx;
		height: 110rpx;
	}

	.login {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-top: 30rpx;
	}

	.login button {
		width: 330rpx;
		height: 110rpx;
		color: #fff;
		line-height: 110rpx;
		font-size: 0.9rem;
	}

	.login button:nth-child(1) {
		background: #3366cc;
	}

	.login button:nth-child(2) {
		background: #ff6600;
	}

	button::after {
		border: 0;
	}

	/*
   .catetitle_2{

      width:720rpx;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      margin-top:20rpx;
      margin-left:15rpx;

   }
   .catetitle_2 >view:nth-child(1){
    font-weight: bold;
    font-size:1rem;
    color:#000000;
   }

   .catetitle_2 >view:nth-child(2){
    font-size:.8rem;
    color:#5b5b5b;
    background:#efefef;
    padding:18rpx;
   }

*/

	.catetitle_2 {
		width: 720rpx;
		display: flex;
		flex-direction: row;

		margin-top: 20rpx;
		margin-left: 15rpx;
		font-weight: bold;
		font-size: 16px;
		color: #000000;
	}

	.catetitle_2 view {
		width: 130rpx;
		text-align: center;
	}

	.cateitem {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.cateitem view:nth-child(2) {
		width: 40rpx;
		height: 10rpx;
		margin-top: 10rpx;
		border-radius: 5rpx;
	}

	.co337 {
		color: #337EE6;
	}

	.cateselected {
		height: 4rpx;
		background: #337EE6;
		z-index: 1;
		bottom: -1rpx;
	}

	.type-container_2 {
		overflow: hidden;
	}

	.type-navbar_2 {
		white-space: nowrap;
	}

	::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
	}

	.type-box_2 {
		padding-top: 20rpx;
		width: 230rpx;
		box-sizing: content-box;
		font-size: 24rpx;
		text-align: center;

		background-color: #fff;
		margin-right: 10rpx;
		border-radius: 20rpx;
		padding-bottom: 20rpx;
		display: flex;
		flex-direction: column;
		display: inline-block;
		overflow: hidden;
		box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
	}

	.type-box_2 .companyname {
		color: #000;
		font-size: 0.8rem;
	}

	.type-box_2 image {
		width: 200rpx;
		height: 200rpx;
	}

	.type-box_2 text {
		color: red;
	}

	.type-item-on_2 {
		border-bottom: 4rpx solid #e64340;
	}

	.joblist_2 {
		display: flex;
		flex-direction: row;
		width: 720rpx;
		margin: 0 auto;
		/*
    border-bottom: 1px solid #efefef;
    */
		padding: 20rpx;

		background: #fff;
		border-radius: 10rpx;
		margin-bottom: 18rpx;
		margin-top: 18rpx;
		box-shadow: 0 1px 6px 0 rgba(59, 83, 115, 0.06), 0 7px 14px 0 rgba(59, 83, 115, 0.1);
	}

	.joblist_2 .title_2 {
		width: 100%;
		flex-direction: column;
		display: flex;
		justify-content: space-between;
	}

	.joblist_2 .title_2 .address_2 {
		padding-left: 2%;
		font-size: 0.8rem;
		color: #646464;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		width: 700rpx;
		padding-top: 20rpx;
	}

	.joblist_2 .title_2 .address_2 view:nth-child(1) {
		color: #000000;
		font-weight: bold;
		width: 52%;
	}

	.joblist_2 .title_2 .address_2 view:nth-child(2) {
		color: #ff9102;
		font-weight: bold;
		width: 47%;
		text-align: right;
		padding-right: 1%;
	}

	.joblist_2 .title_2 .detail_2 {
		padding-left: 2%;
		text-align: left;
		font-size: 0.8rem;
		color: #000;
		display: flex;
		flex-direction: row;
		width: 100%;
		margin-top: 15rpx;
	}

	.joblist_2 .title_2 .detail_2 .pic_2 {
		width: 10%;
		display: flex;
		align-items: center;
	}

	.joblist_2 .title_2 .detail_2 .pic_2 image {
		width: 60rpx;
		height: 60rpx;
		align-self: center;
	}

	.joblist_2 .title_2 .detail_2 .info_2 {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.joblist_2 .title_2 .detail_2 .info_2>view:nth-child(1) {
		padding-top: 5rpx;
		color: #686868;
		font-size: 0.7rem;

		display: flex;
		flex-direction: column;
		width: 65%;
	}

	.joblist_2 .title_2 .detail_2 .info_2>view:nth-child(2) {
		margin-top: 5rpx;
		padding-bottom: 10rpx;
		color: #888888;
		font-size: 0.7rem;
		width: 35%;
	}

	.companyinfo_2 {
		display: flex;
		flex-direction: row;
		justify-content: center;
		font-size: 1.2rem;
	}

	.joblist_2 .title_2 .detail_2 .info_2 .companyinfo_2 view:nth-child(1) {
		color: #888888;
	}

	.joblist_2 .title_2 .detail_2 .info_2 .companyinfo_2 view:nth-child(2) {
		color: #888888;
		margin-top: 10rpx;
	}

	.joblist_2 .title_2 .price_2 {
		width: 28%;
	}

	.joblist_2 .title_2 .price_2 .money_2 {
		color: #d65408;
		font-weight: bold;
		font-size: 0.7rem;
		padding-right: 10rpx;
	}

	.jobname_2 {
		font-size: 1rem;
		color: #000000;
		display: flex;
		flex-direction: row;
	}

	.jobname_2>text {
		color: #fff;
		background: #ff5d37;
		padding: 6rpx;
		border-radius: 5rpx;
	}

	.jobname_2 image {
		width: 40rpx;
		height: 40rpx;
	}

	.joblable_2 {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		font-size: 0.7rem;
		color: #888888;
		padding-left: 2%;
		margin-top: 10rpx;
	}

	.vprice_2 {
		font-size: 0.6rem;
		background: #34c6c3;
		font-weight: bold;
		color: #fff;
		height: 70rpx;
		line-height: 70rpx;
		width: 140rpx;

		margin-left: 80rpx;

		border-radius: 40rpx;
		text-align: center;
	}

	.special_2 {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		flex-wrap: wrap;
		margin-top: 10rpx;
		padding-left: 2%;

		width: 700rpx;
	}

	.special_2 .items_2 {
		margin-right: 10rpx;
		border-radius: 8rpx;
		padding: 8rpx;
		font-size: 26rpx;
		margin-top: 10rpx;
		background: #f1f1f1;
		color: #888888;
	}

	.moneyinfo_2 {
		color: #34c6c3;
		font-size: 1rem;
		font-weight: bold;
	}

	.time_2 {
		text-align: right;
		padding-right: 25rpx;
	}

	.fxmoney_2 {
		display: flex;
		flex-direction: column;
	}

	.fxmoney_2>view {
		font-size: 0.6rem;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.fxmoney_2>view:nth-child(1) {
		width: 200rpx;
		height: 60rpx;
		background: #34c6c3;
		border-radius: 10rpx 10rpx 0 0;
		border: 1rpx solid #34c6c3;
		color: #fff;
	}

	.fxmoney_2>view:nth-child(2) {
		width: 200rpx;
		height: 60rpx;
		background: #fff;
		border-radius: 0rpx 0rpx 10rpx 10rpx;
		border: 1rpx solid #34c6c3;
		color: #34c6c3;
		text-align: center;
	}

	.jobinfo_2 {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.jobinfo_2>view:nth-child(1) {
		width: 70%;
	}

	.jobinfo_2>view:nth-child(2) {
		width: 30%;
	}

	.notice {
		width: 700rpx;
		background: #fff;
		margin-top: 20rpx;
		display: flex;
		flex-direction: row;
		font-size: 0.8rem;
		padding-top: 10rpx;
		justify-content: space-between;
		padding-left: 30rpx;
		box-shadow: 0 1px 6px 0 rgba(59, 83, 115, 0.06), 0 7px 14px 0 rgba(59, 83, 115, 0.1);
	}

	.notice text {
		color: #42be9c;
		margin-top: 10rpx;
		margin-right: 10rpx;
	}

	.swiper_item_move {
		font-size: 0.8rem;
		text-overflow: ellipsis;
		letter-spacing: 2px;
		display: flex;
		flex-direction: column;
	}

	.arc {
		display: flex;
		width: 100rpx;
		height: 100rpx;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.arc image {
		width: 70rpx;
		height: 70rpx;
	}

	.arc view {
		width: 100rpx;
		height: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 0.7rem;
	}

	.arc view:nth-child(2) {
		background: #3366cc;
		color: #fff;
		border-radius: 5rpx;
	}

	.morejob {
		width: 100%;
		height: 80rpx;
		line-height: 80rpx;
		background: #fff;
		margin-top: 10rpx;
		color: #3366cc;
		font-size: 0.8rem;
		text-align: center;
		margin-bottom: 80rpx;
	}

	.footerinfo {
		display: flex;
		flex-direction: row;
		font-size: 0.7rem;
		background: #fff;
		width: 100%;
		justify-content: center;
		padding-bottom: 30rpx;
	}

	.footerinfo view {
		width: 150rpx;
		text-align: center;
	}

	.guanzhu {
		width: 140rpx;
		height: 50rpx;
		background: #04BE02;
		border-radius: 6rpx;
	}

	@import 'undefined';
</style>